<template>
	<view>
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				:duration="duration">
				<swiper-item v-for="items in interestData">
					<image :src="items.url" mode="aspectFill" style="width: 100%;"></image>
				</swiper-item>
					
				<!--  <swiper-item>
					<view class="swiper-item uni-bg-green">B</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-blue">C</view>
				</swiper-item> -->
			</swiper>
			<text class="uni-body">{{description}}</text>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
		        return {
					interestData:'',
					description:'',
					
		            background: ['color1', 'color2', 'color3'],
		            indicatorDots: true,
		            autoplay: true,
		            interval: 2000,
		            duration: 500
		        }
		    },
		    methods: {
		        intervalChange(e) {
		            this.interval = e.target.value
		        },
		        durationChange(e) {
		            this.duration = e.target.value
		        }
		    },

		onLoad(option) {
			console.log(option.u),
			this.description = option.desc,
			console.log('interestDetail: ',this.description)
			uni.request({
				url:`http://microtourism.natapp1.cc/serviceinterestpoint/interest-picture/list/${option.u}`,
				method: 'GET',
				success: (res) => {
				    this.interestData = res.data.data
					// console.log(res)
					// console.log(res)
					console.log('interestData: ',this.interestData)
				},
				fail: (err) => {
					console.log(err)
				}
			})
		}
	}
</script>
<style>
	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
	}
	.swiper {
		height: 600rpx;
		width: 100%;
	}
	.swiper-item {
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
	}
	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}
	.uni-common-mt {
		margin-top: 60rpx;
		position: relative;
	}
	.info {
		position: absolute;
		right: 20rpx;
	}
	.uni-padding-wrap {
		width: 550rpx;
		padding: 0 100rpx;
	}
</style>
